home *** CD-ROM | disk | FTP | other *** search
/ Amiga Packmags / NewsFlash - Issue 07 (1990-01)(UGA - 17-Bit Software)(Disk 1 of 2)[a].zip / NewsFlash - Issue 07 (1990-01)(UGA - 17-Bit Software)(Disk 1 of 2)[a].adf / sources / Alert.S next >
Text File  |  1988-01-19  |  1KB  |  57 lines

  1. ; Display an Alert
  2. ; (C)1989 by Brian Postma
  3. ; J.v.Hartenstraat 51
  4. ; 7576VX Oldenzaal (NL)
  5. ; Tel:05410-14763
  6.  
  7. start:    move.l        4,a6        ;Execbase
  8.     lea        intname,a1    ;Library Name
  9.     jsr        -408(a6)    ;Open Library
  10.     move.l        d0,intbase    ;Library Base
  11.     lea        dosname,a1    ;Library Name
  12.     jsr        -408(a6)    ;Open Library
  13.     move.l        d0,dosbase
  14.  
  15.     move.l        dosbase,a6    ;fetch handle from current
  16.     jsr        -60(a6)        ;Output device->CLI
  17.     move.l        d0,handle    ;And save it
  18.     move.l        intbase,a6
  19.     move.l        #0,d0        ;Alert Number
  20.     move.l        #64,d1        ;Alert Height
  21.     lea        alert,a0    ;Alert Text
  22.     jsr        -90(a6)        ;Display alert
  23.     tst.b        d0        ;Left or Right Button
  24.     beq        right        ;Right Mousebutton ??
  25. left:    move.l        #lefttext,d2    ;Buffer
  26.     move.l        #el-lefttext,d3    ;Length
  27.     bra        text
  28. right:    move.l        #righttext,d2    ;Buffer
  29.     move.l        #er-righttext,d3;Length
  30. text:    move.l        handle,d1    ;Output Handle
  31.     move.l        dosbase,a6
  32.     jsr        -48(a6)        ;Write (to CLI)
  33. quit:    clr.l        d0
  34.     rts
  35. ;Vars
  36. handle:        dc.l    0
  37. dosbase:    dc.l    0
  38. intbase:    dc.l    0
  39. lefttext:    dc.b    "You pressed the LEFT mouse button",10,10
  40. el:
  41. righttext:    dc.b    "You pressed the RIGHT mouse button",10,10
  42. er:
  43. x1 = 236
  44. y1 = 16
  45. x2 = 240
  46. y2 = 32
  47. x3 = 184
  48. y3 = 48
  49. alert:    dc.b    x1/256,x1,y1,"Created for UGA PD by",0,1
  50.     dc.b    x2/256,x2,y2,"Brian Postma in 1989",0,1
  51.     dc.b    x3/256,x3,y3,"Press any mouse button to continue",0,0
  52. ; 0,1 means: there is more text coming,
  53. ; 0,0 means: end of all alert data.
  54.  
  55. intname:    dc.b    "intuition.library",0
  56. dosname:    dc.b    "dos.library",0
  57.